package neu.soft.feignclient;

import feign.hystrix.FallbackFactory;
import neu.soft.entity.DO.Province;
import neu.soft.entity.OperationWarehouse;
import neu.soft.query.WarehousePageQuery;
import neu.soft.vo.PageBean;
import neu.soft.vo.ResultBean;

public class FindInboundRoomIdFallBackFactory implements FallbackFactory<FindInboundRoomId> {

    @Override
    public FindInboundRoomId create(Throwable throwable) {
        return new FindInboundRoomId() {
            @Override
            public ResultBean<Province> getLoc() {
                System.out.println(throwable.getMessage());
                return ResultBean.error(500,throwable.getMessage());
            }

            @Override
            public ResultBean<PageBean<OperationWarehouse>> findByPage(WarehousePageQuery warehouseQuery) {
                System.out.println(throwable.getMessage());
                return ResultBean.error(500,throwable.getMessage());
            }
        };
    }
}
